<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .big {
            width: 1000px;
            height: 1000px;
            background: red;
        }
        
        .middle {
            width: 500px;
            height: 500px;
            background: blue;
        }
        
        .small {
            width: 250px;
            height: 250px;
            background: greenyellow;
        }
    </style>
</head>

<body>
    <div id="app">
        <!-- 按键修饰符 -->
        <input type="text" @keyup.enter="fn">、
        <hr> 第二步系统组合键
        <input type="text" @keydown.ctrl.alt="gn">
        <hr> 第三步事件修饰符
        <div class="big" @click.stop="big">
            <div class="middle" @click.stop="middle">
                <div class="small" @click.stop="small">

                </div>
            </div>
        </div>
        <div class="big" @click.capture="big">
            <div class="middle" @click.capture="middle">
                <div class="small" @click.capture="small">

                </div>
            </div>
        </div>
        <a href="" @click.prevent='fn'>2111111</a>

    </div>

</body>

</html>
<script src="../lib/vue.global.js"></script>
<script>
    Vue.createApp({
        data() {

        },
        methods: {
            fn() {
                alert("触发了")
            },
            gn() {
                alert("asbhdiuahoi")
            },
            big() {
                alert('big')
            },
            middle() {
                alert("middle")
            },
            small() {
                alert("small")
            }

        }
    }).mount("#app")
</script>